package com.jie.model.dto.user;

import com.jie.component.validation.annotion.NotEmpty;
import com.jie.component.validation.annotion.Password;
import com.jie.component.validation.annotion.Phone;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

import static com.jie.common.constant.StrConst.PASSWORD_RGX;

/**
 * @author jie
 * @version 1.0 2025-02-13
 */
@Data
public class UserRegisterWithPhoneDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 注册的手机号
     */
    @Phone
    private String phone;

    /**
     * 短信验证码
     */
    @NotEmpty(message = "验证码不能为空")
    private String code;

    /**
     * 注册的密码
     */
    @Password(regex = PASSWORD_RGX,message = "密码格式错误")
    private String password;

}
